#include<bits/stdc++.h>
using namespace std;
int main()
{
	int n, flag, sum, ans = 0;;
	cin>>n;
	while(n--)
	{
		sum = 0;
		for(int i = 1;i <= 3;i++)
		{
			cin>>flag;
			sum += flag;
		}
		if(sum >= 2)
			ans++;
	}
	cout<<ans;
	return 0;
}

